__Version__ = '1.0.0+fi1'
__Config__ = {
    'Version' : __Version__,
    'author' : {
        'ChengPeishuo':{
                None:None
            }
        },
    'open lisence' : 'GPL 3.0'
}
import time
import random
from pynput.keyboard import Key, Controller as key_cl
from  pynput.mouse import Button, Controller as mouse_cl

def keyboard_input(string):
    keyboard = key_cl()
    keyboard.type(string)
def mouse_click():
    mouse = mouse_cl()
    mouse.press(Button.left)
    mouse.release(Button.left)
def send_message(number,string,flac_ctrl):
    keyboard = key_cl()
    for i in range(number):
        keyboard_input(string)
        mouse_click()
        time.sleep(0.1)
        if flac_ctrl == True:
            keyboard.press(Key.ctrl)
        keyboard.press(Key.enter)
        keyboard.release(Key.enter)
        if flac_ctrl == True:
            keyboard.release(Key.ctrl)



if __name__ == '__main__':
    cps3 = input('''
    ——————————————
    |    欢迎来到信息轰炸机    |
    |       （企鹅版）         |
    |   让你的朋友感受绝望吧   |
    |        (Yes/NO)          |  
    ——————————————
    请输入选择：''')
    if cps3 == 'Yes' or cps3 == 'yes':
        str1 = input('''
    请选择企鹅发送的模式：
    1.Enter
    2.Ctrl+Enter
    请选择：''')
        message = input('message:')
        num = input('cd')
        if str1 == '1':
            send_message(num, message, False)
        if str1 == '2':
            send_message(num, message, True)
        
    else:
        print('退出...')
        time.sleep(3)

